import request from "@/utils/request";
import { RequestData } from "./type";
enum API {
    BANNER = '/banner',
    HOTCATEGORY = '/playlist/hot',
    HOTPLAYLIST = '/personalized',
    NEWDISC = '/album/newest',
    TOPLIST = '/toplist',
    TOPLISTDEATIL = '/playlist/detail',
    SINGERLIST = '/artist/list',
    ANCHORLIST = '/dj/toplist/popular'
}

export const reqBanner = ()=>request.get<any,RequestData>(API.BANNER)
export const reqHotCategory = ()=>request.get<any,any>(API.HOTCATEGORY)
export const reqHotList = (num:number)=>request.get<any,any>(`${API.HOTPLAYLIST}?limit=${num}`)
export const reqNewDisc = (limit?:number)=>request.get<any,any>(`${API.NEWDISC}?offset=0&limit=${limit}`)
export const reqTopList = ()=>request.get<any,any>(API.TOPLIST)
export const reqTopListDetail = (id:number)=>request.get<any,any>(`${API.TOPLISTDEATIL}?id=${id}`)
export const reqSingerList = (limit:number)=>request.get<any,any>(`${API.SINGERLIST}?limit=${limit}`)
export const reqAnchorList = (limit:number)=>request.get<any,any>(`${API.ANCHORLIST}?limit=${limit}`)